package com.duobaoyu.dby.supply.biz.service.rule;


/**
 * @author liyang
 * @version 1.0.0
 * @ClassName AbstractRule
 * @Description 规则模板
 * @createTime 21:17:00 2021/08/22
 */
public abstract class AbstractRule<T> implements IRuleExecute {

    protected T convert(BaseRule rule){

        return (T) rule;
    }

    @Override
    public boolean execute(BaseRule rule) {

        return this.executeRule(this.convert(rule));
    }

    protected boolean executeRule(T t) {
        return true;
    }
}
